//
//  ZZPopMenu.h
//  ZZPopMenu
//
//  Created by 科大 on 2024/2/26.
//

#import <UIKit/UIKit.h>
#import "ZZPopMenuItem.h"

NS_ASSUME_NONNULL_BEGIN

typedef NS_ENUM(NSUInteger, ZZMenuDirection) {
    ZZMenuDirectionHorizontal,  // 水平
    ZZMenuDirectionVertical,   // 竖直
};

typedef void(^ZZPopMenuClick)(NSInteger index);
typedef void(^ZZPopMenuCancel)(void);

@interface ZZPopMenu : UIViewController

/// 显示菜单
/// - Parameters:
///   - view: 目标view
///   - direction: 方向
///   - items: item配置
///   - click: 点击
///   - cancel: 取消
+ (void)showBy:(UIView *)view direction:(ZZMenuDirection)direction items:(NSArray<ZZPopMenuItem *> *)items click:(ZZPopMenuClick)click cancel:(ZZPopMenuCancel)cancel;

@end

NS_ASSUME_NONNULL_END
